import request from '@/utils/request';

// 查询调度日志列表
export function listJobLog(query) {
  return request({
    url: '/web/monitor/app/jobLog/list',
    method: 'get',
    params: query,
  });
}

// 删除调度日志
export function delJobLog(jobLogId) {
  return request({
    url: '/web/monitor/app/jobLog/delete/' + jobLogId,
    method: 'post',
  });
}

// 清空调度日志
export function cleanJobLog() {
  return request({
    url: '/web/monitor/app/jobLog/clean',
    method: 'post',
  });
}

// 导出
export function exportJobLog(params) {
  return request({
    url: '/web/monitor/app/jobLog/export',
    method: 'post',
    params,
    responseType: 'blob',
    filename: `job_log_${new Date().getTime()}.xlsx`,
  });
}
